#pragma once

#include "Node.h"
#include "GameObject.h"

// Subsector class contains a pointer to a Gameobject
// This facilitates ease of rendering and obtaining
// objects by iterating through the current map and
// accessing objects via the pointer in this class

class Subsector : public Node
{
public:
	// Constructors/Destructors
	Subsector();
	Subsector(GameObject* gp, int x = 0, int y = 0);
	virtual ~Subsector();

	// Steals the object from the given Subsector
	void		StealGameObject(Subsector &s);

	// gets the object held at this subsector
	GameObject*	GetGameObject(void)	{return mObject;};
	void		SetGameObject(GameObject* obj);

	// Called by the main game to destroy the object stored in this Subsector
	void		DestroyGameObject(void);

private:
	GameObject* mObject;
};